package com.caosy.grassthinkremote.controller;

import com.caosy.grassthinkremote.common.RespData;
import com.caosy.grassthinkremote.entity.vo.CommodityReq;
import com.caosy.grassthinkremote.service.CommodityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/commodity")
@ResponseBody
public class CommodityController {
    @Autowired
    private CommodityService commodityService;

    @PostMapping("/add")
    public RespData add(@RequestBody CommodityReq req) {
        return commodityService.add(req);
    }
}
